<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改图书信息</title>
    <style>
        body {
            background-color: #e0e7ff;  /* 更柔和的背景色 */
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
        }
        h2 {
            text-align: center;
            color: #333;
            margin-bottom: 20px;
        }
        form {
            max-width: 500px;
            margin: auto;
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        }
        table {
            width: 100%;
            border-collapse: collapse;
        }
        td {
            padding: 15px;
            border: none;
        }
        input[type="text"], input[type="file"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            box-sizing: border-box;
            font-size: 14px;
            transition: border-color 0.3s;
        }
        input[type="text"]:focus {
            border-color: #007bff;  /* 聚焦时边框颜色 */
            outline: none;
        }
        input[type="submit"] {
            background-color: #007bff;  /* 蓝色背景 */
            color: white;
            border: none;
            padding: 10px 15px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin: 20px 0;
            cursor: pointer;
            border-radius: 4px;
            transition: background-color 0.3s;
        }
        input[type="submit"]:hover {
            background-color: #0056b3;  /* 悬停效果颜色 */
        }
        img {
            max-width: 100px;
            height: auto;
            display: block;
            margin: 0 auto 10px;
        }
        .required {
            color: red;  /* 必填项的颜色 */
            font-weight: bold;
        }
        .info {
            color: #555;  /* 提示信息的颜色 */
            font-size: 12px;
        }
    </style>
</head>
<body>
<h2>添加图书信息</h2>
<form id="itemForm" action="${pageContext.request.contextPath}/book/insertBook" method="post" enctype="multipart/form-data">
    <input type="hidden" name="id" value="${book.id}" />
    <table>
        <tr>
            <td><span class="required">*</span>书名:</td>
            <td>
                <input type="text" name="name" required />
                <span class="info">请输入书名</span>
            </td>
        </tr>
        <tr>
            <td><span class="required">*</span>出版社:</td>
            <td>
                <input type="text" name="press" required />
                <span class="info">请输入出版社名称</span>
            </td>
        </tr>
        <tr>
            <td><span class="required">*</span>作者:</td>
            <td>
                <input type="text" name="author"  required />
                <span class="info">请输入作者姓名</span>
            </td>
        </tr>
        <tr>
            <td>图片:</td>
            <td>
                <input type="file" name="filename" multiple>
            </td>
        </tr>
        <tr>
            <td>更新时间:</td>
            <td>
                <input type="text" name="updatetime" >
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center"><input type="submit" value="提交" /></td>
        </tr>
    </table>
</form>
</body>
</html>